home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #14
/
Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO
/
pcboard
/
msgtag11.zip
/
WAIT.PPS
< prev
Wrap
Text File
|
1996-01-30
|
7KB
|
260 lines
;──────────────────────────────────────────────────────────────────────────────
; WAIT.PPE - By Dan Shore - SysOp
; The Shoreline BBS
;
; Purpose: Replacement of the Press (Enter) to Continue prompt
; for use with the msg tagging PPE's (QSCAN, READ, KILL,
; RECOVER, MORE, MEC)
;
; To install:
;
; 1) Edit your PCBText file and change the following entry:
;
; MKPCBTXT PCBTEXT /I:418 "!C:\PCB\PPE\WAIT\WAIT.PPE"
;
; Note: You may have to change the pathname of the WAIT.PPE
;
;──────────────────────────────────────────────────────────────────────────────
;──────────────────────────────────────────────────────────────────────────────
; Note: If you do not wish to have a mutiple colorized prompt, you can do
; two things. You can go to :SET_NEW_COLOR and change the colors
; to your liking.
;
; If you do change the color in :SET_NEW_COLOR you must make sure
; the color name you are using in defined in :SET_COLOR_MODE
;
;──────────────────────────────────────────────────────────────────────────────
STRING hold1 ' Generic string variable
STRING esc ' ESC character
STRING red(2) ' Color
STRING dcyan(2) ' ""
STRING cyan(2) ' ""
STRING white(2) ' ""
STRING yellow(2) ' ""
STRING green(2) ' ""
STRING purple(2) ' ""
STRING normal(2) ' ""
STRING blue(2) ' ""
STRING hold ' Generic string variable
STRING prompt ' Display prompt variable
STRING sema_path ' Path and name of semaphore file
STRING page_length_file ' File containing users original page length
STRING tag_msg_file ' File containing tagged msgs
INT letter_number ' Used for displaying letters in ENTER
INT color ' Used for color selection
INT xpos ' Cursor position
INT ypos ' Cursor position
FLOAT time_now ' Current TIME
FLOAT prev_ti ' Previous TIME
BOOLEAN gmode ' Graphics Mode of user
;──────────────────────────────────────────────────────────────────────────────
'
' Set Initial values for a couple of variables
'
letter_number = 1
color = 1
'
' Determine path for pcb swap file
'
hold = READLINE(PCBDAT(),204)
hold = FILEINF(hold,6) + ":" + FILEINF(hold,7)
'
' Determine path/filename of tagged msg file and semaphore file
'
sema_path = hold + "msgtag.use"
tag_msg_file = hold + "mtg" + STRING(CURCONF()) + ".lst"
page_length_file = hold + "userpl.dat"
IF (EXIST(sema_path)) THEN
'
' execute MORE.PPE here so that user can tag messages
' when there is not a complete screen and the "normal" more
' prompt is not used.
'
DISPTEXT 196, GRAPH+LANG
'
' Set page length back
'
GETUSER
'
' Need to read a file here to get users old page length setting
'
IF (EXIST(page_length_file)) THEN
FOPEN 7, page_length_file, O_RD, S_DN
FGET 7, hold
U_PAGELEN = TOINT(hold)
FCLOSE 7
PUTUSER
DELETE page_length_file
END IF
IF (FILEINF(tag_msg_file,4) = 0) DELETE tag_msg_file
DELETE sema_path
END IF
'
' See if the user support ANSI
'
GOSUB SET_COLOR_MODE
'
' Display the prompt and wait for a CR from the user to exit PPE
' (We do this by watching the modem for input from user with MGETBYTE
' command and looping ENDLESSLY until CR or keyboard timeout occurs)
'
IF (GRAFMODE()="G") THEN
'
' Modify this next line for how your want
' your WAIT prompt to appear
'
prompt = SPACE(17) + "@X03───@X0B─═══ Press @X02(@X03Enter@X02) @X0Bto Continue @X0B═══─@X03───@X07"
PRINT CHR(13)
NEWLINE
xpos = GETX()
ypos = GETY()
ANSIPOS xpos, ypos
PRINT prompt
ELSE
'
' Modify this prompt to your liking for the non-ansi user
'
prompt = SPACE(17) + "────═══Press (Enter) to Continue═══────"
PRINT prompt
END IF
'
' Loop endlessly until the user or sysop hits ENTER
'
WHILE (1) DO
hold = MGETBYTE()
IF (hold = 13 || hold = CHR(13)) THEN
GOSUB STUFF_IT
ELSE
hold = KINKEY()
IF (hold = 13 || hold = CHR(13)) GOSUB STUFF_IT
END IF
'
' ────────────────────────────────────────────────────────────────┐
' Remove the next statement if you do not want "ENTER" to have │
' the letters changing color while waiting for the user to respond│ │
' ────────────────────────────────────────────────────────────────┘
'
IF (GRAFMODE() = "G") GOSUB DISPLAY_LETTER
'
END WHILE
END
'
' Stuff a carriage return into keyboard
'
:STUFF_IT
KBDSTUFF CHR(13)
END
'
' Sets the next color to be displayed
'
:SET_NEW_COLOR
IF (color = 5) color = 1
SELECT CASE (color)
CASE 1
hold1 = red(gmode)
CASE 2
hold1 = green(gmode)
CASE 3
hold1 = cyan(gmode)
CASE 4
hold1 = purple(gmode)
END SELECT
INC color
RETURN
'
' This is the routine to display the letters one at a time
'
:DISPLAY_LETTER
IF (letter_number > 5) letter_number = 1
SELECT CASE (letter_number)
CASE 1
ANSIPOS xpos+32, ypos
GOSUB SET_NEW_COLOR
PRINT hold1 + "E"
DELAY 5
CASE 2
ANSIPOS xpos+33, ypos
GOSUB SET_NEW_COLOR
PRINT hold1 + "n"
DELAY 5
CASE 3
ANSIPOS xpos+34, ypos
GOSUB SET_NEW_COLOR
PRINT hold1 + "t"
DELAY 5
CASE 4
ANSIPOS xpos+35, ypos
GOSUB SET_NEW_COLOR
PRINT hold1 + "e"
DELAY 5
CASE 5
ANSIPOS xpos+36, ypos
GOSUB SET_NEW_COLOR
PRINT hold1 + "r"
GOSUB SET_NEW_COLOR
DELAY 5
END SELECT
INC letter_number
RETURN
'
' Set high intensity or low intensity for colors based on users preference
'
:SET_COLOR_MODE
'
' Set the color variables either to nothing or to an ANSI
' color depending if the user supports it or not. Support
' is determined by using the GRAFMODE() command.
'
' **--> Subroutine Idea originally from DLPROMPT.PPE
'
' N = No ANSI
' A = Ansi with no color
' G = Ansi with color
' R = RIP Graphics
'
esc = CHR(27)
gmode = GRAFMODE()="A"
;
; User supports ANSI
;
dcyan(0) = esc + "[0;36m"
cyan(0) = esc + "[1;36m"
white(0) = esc + "[1;37m"
normal(0) = esc + "[0m"
yellow(0) = esc + "[1;33m"
purple(0) = esc + "[1;35m"
green(0) = esc + "[1;32m"
red(0) = esc + "[1;31m"
;
; User does not support ANSI
;
yellow(1) = ""
green(1) = ""
white(1) = ""
dcyan(1) = ""
cyan(1) = ""
normal(1) = ""
red(1) = ""
RETURN